import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/spring-test.xml"})
public class DormitoryServiceTestCase {

	@Autowired
	//private DormitoryService dormitoryService;
	private ApplicationContext context;
	
	@Test
	public void testDormitoryService() {
		//int totalBeds = dormitoryService.getTotalBeds();
		for (String name : context.getBeanDefinitionNames()) {
			System.out.println(name + "=" + context.getBean(name));
		}
	}
}
